package com.babyqiao.wallpaper.portal.controller;

import com.babyqiao.wallpaper.common.UnifyResult;
import com.babyqiao.wallpaper.portal.entity.vo.ActorResVO;
import com.babyqiao.wallpaper.portal.service.IActorInfoService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author QLZ
 * @date 2021/2/28
 */
@RestController
@Api(tags = "演员相关接口")
@RequestMapping("/wp/actor")
public class ActorController {
    @Autowired
    IActorInfoService actorInfoService;

    @GetMapping("actors/{actorId}")
    @ApiOperation(value = "根据演员id获取演员信息",httpMethod = "GET")
    public UnifyResult getActorInfo(@ApiParam(name = "actorId",value = "演员ID",required = true) @PathVariable String actorId){

        ActorResVO actorResVO=actorInfoService.findActorService(actorId);
        return UnifyResult.success().data("result",actorResVO);
    }

}
